package com.yunkaweilai.android.view.dialog;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.view.View;
import android.widget.TextView;

import com.yunkaweilai.android.R;
import com.yunkaweilai.android.interfaces.StringInterface;


/**
 * 添加会员出
 * Created by Administrator on 2016/12/22 0022.
 */

public class AddMemberDialog extends Dialog{
    private TextView idTvContent;
    private TextView idTvRight;
    private TextView idTvClose;
    private StringInterface stringInterface;
    private String type;
    public AddMemberDialog(@NonNull Context context, StringInterface stringInterface,String type) {
        super(context, R.style.dialog);
        this.type = type;
        this.stringInterface = stringInterface;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.dialog_add_member);
        idTvContent = ((TextView) findViewById(R.id.id_tv_content));
        idTvRight = ((TextView) findViewById(R.id.id_tv_right));
        idTvRight.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                stringInterface.getString(type);
                dismiss();
            }
        });
        idTvClose = ((TextView) findViewById(R.id.id_tv_close));
        idTvClose.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                dismiss();
            }
        });

    }

}
